<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,IE=9,chrome=1"><meta name="generator" content="MATLAB 2021a"><title>Metabotools tutorial I</title><style type="text/css">.rtcContent { padding: 30px; } .S0 { margin: 3px 10px 5px 4px; padding: 0px; line-height: 28.8px; min-height: 0px; white-space: pre-wrap; color: rgb(213, 80, 0); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 24px; font-weight: normal; text-align: left;  }
.S1 { margin: 20px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: pre-wrap; color: rgb(60, 60, 60); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: bold; text-align: left;  }
.S2 { margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(0, 0, 0); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: normal; text-align: left;  }
.CodeBlock { background-color: #F7F7F7; margin: 10px 0 10px 0;}
.S3 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 1px solid rgb(233, 233, 233); border-bottom: 0px none rgb(0, 0, 0); border-radius: 4px 4px 0px 0px; padding: 6px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px;  }
.S4 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 0px none rgb(0, 0, 0); border-bottom: 1px solid rgb(233, 233, 233); border-radius: 0px 0px 4px 4px; padding: 0px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px;  }
.S5 { margin: 3px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: pre-wrap; color: rgb(60, 60, 60); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: bold; text-align: left;  }
.S6 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 0px none rgb(0, 0, 0); border-bottom: 0px none rgb(0, 0, 0); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px;  }
.S7 { margin: 10px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(0, 0, 0); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: normal; text-align: left;  }
.S8 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 1px solid rgb(233, 233, 233); border-bottom: 1px solid rgb(233, 233, 233); border-radius: 4px; padding: 6px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px;  }</style></head><body><div class = rtcContent><h1  class = 'S0'><span>Metabotools tutorial I</span></h1><h2  class = 'S1'><span>Authors: Maike K. Aurich, Sylvain Arreckx, </span><span style=' font-weight: bold;'>Systems Biochemistry Group, LCSB, University of Luxembourg.</span></h2><h2  class = 'S1'><span style=' font-weight: bold;'>Reviewer(s): Anne Richelle, Lewis Lab at University of California, San Diego.</span></h2><div  class = 'S2'><span style=' font-weight: bold;'>INTRODUCTION</span></div><div  class = 'S2'><span>In this tutorial, we generate contextualized models of two lymphoblastic leukemia cell lines, CCRF-CEM and Molt- 4 cells. They will be generated by integrating semi-quantitative metabolomic data, transcriptomic data, and growth rates. We will afterwards analyze the solution space of these models by using a sampling analysis.</span></div><div  class = 'S2'><span>Before running a section in the tutorial, read the corresponding sections in the MetaboTools protocol and supplemental tutorial (Data sheet 2,</span><span> </span><a href = "http://journal.frontiersin.org/article/10.3389/fphys.2016.00327/full"><span>http://journal.frontiersin.org/article/10.3389/fphys.2016.00327/full</span></a><span>). </span></div><div  class = 'S2'><span style=' font-weight: bold;'>PROCEDURE</span></div><div  class = 'S2'><span>Clear workspace and initialize the COBRA Toolbox</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span >clear</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre"><span >initCobraToolbox(false) </span><span style="color: rgb(2, 128, 9);">% false, as we don't want to update</span></span></div></div></div><h2  class = 'S5'><span>Step</span><span> </span><span style=' font-weight: bold;'>0</span><span> - Define the output location and set the LP solver</span></h2><div  class = 'S2'><span>Define the output path and set the solver for LP problem</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span style="color: rgb(14, 0, 255);">global </span><span >CBTDIR </span><span style="color: rgb(2, 128, 9);">% set path to cobratoolbox (pathToCOBRA)</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >outputPath = pwd;</span><span style="color: rgb(2, 128, 9);">% ouputPath = 'ADD YOUR PATH TO YOUR OUTPUT FOLDER'</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >solver = </span><span style="color: rgb(170, 4, 249);">'glpk'</span><span >; </span><span style="color: rgb(2, 128, 9);">% solver = 'ADD YOUR SOLVER'; %, e.g., 'cplex_direct' for ILOG</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre"><span >solverOK = changeCobraSolver(solver, </span><span style="color: rgb(170, 4, 249);">'LP'</span><span >);</span></span></div></div></div><div  class = 'S2'><span>Check the solver setup</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span style="color: rgb(14, 0, 255);">if </span><span >solverOK == 1</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    fprintf(</span><span style="color: rgb(170, 4, 249);">'Solver %s is set.\n'</span><span >, solver);</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span style="color: rgb(14, 0, 255);">else</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    error(</span><span style="color: rgb(170, 4, 249);">'Solver %s could not be used. Check if %s is in the matlab path (set path) or check for typos'</span><span >, solver, solver);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre"><span style="color: rgb(14, 0, 255);">end</span></span></div></div></div><div  class = 'S2'><span>Load and check that the input model is correclty loaded</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span >tutorialPath = fileparts(which(</span><span style="color: rgb(170, 4, 249);">'tutorial_metabotoolsI.mlx'</span><span >));</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span style="color: rgb(14, 0, 255);">if </span><span >isequal(exist([tutorialPath filesep </span><span style="color: rgb(170, 4, 249);">'starting_model.mat'</span><span >], </span><span style="color: rgb(170, 4, 249);">'file'</span><span >), 2)</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    starting_model = readCbModel([tutorialPath filesep </span><span style="color: rgb(170, 4, 249);">'starting_model.mat'</span><span >]);</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    fprintf(</span><span style="color: rgb(170, 4, 249);">'The model is loaded.\n'</span><span >);</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span style="color: rgb(14, 0, 255);">else</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    error(</span><span style="color: rgb(170, 4, 249);">'The model ''starting_model'' could not be loaded.'</span><span >);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre"><span style="color: rgb(14, 0, 255);">end</span></span></div></div></div><div  class = 'S2'><span>Check output path and writing permission</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span style="color: rgb(14, 0, 255);">if </span><span >~exist(outputPath, </span><span style="color: rgb(170, 4, 249);">'dir'</span><span >) == 7</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    error(</span><span style="color: rgb(170, 4, 249);">'Output directory in ''outputPath'' does not exist. Verify that you type it correctly or create the directory.'</span><span >);</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span style="color: rgb(2, 128, 9);">% Make and save a dummy file to test the writing to output directory</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >A = rand(1);</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span style="color: rgb(14, 0, 255);">try</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    save([outputPath filesep </span><span style="color: rgb(170, 4, 249);">'A'</span><span >]);</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span style="color: rgb(14, 0, 255);">catch </span><span >ME</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    error(</span><span style="color: rgb(170, 4, 249);">'Files cannot be saved to the provided location: %s\nObtain rights to write into %s directory or set ''outputPath'' to a different directory.'</span><span >, outputPath, outputPath);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre"><span style="color: rgb(14, 0, 255);">end</span></span></div></div></div><h2  class = 'S5'><span>Step 1: Shaping the model's environment using setMediumConstraints</span></h2><div  class = 'S2'><span>Constrain the model using the data related to RPMI medium composition. To this end, define the set of exchange reactions for which exometabolomic data are available</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span >medium_composition = {</span><span style="color: rgb(170, 4, 249);">'EX_ala_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_arg_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_asn_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_asp_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_cys_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_gln_L(e)'</span><span >;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    </span><span style="color: rgb(170, 4, 249);">'EX_glu_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_gly(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_his_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_ile_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_leu_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_lys_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_met_L(e)'</span><span >;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    </span><span style="color: rgb(170, 4, 249);">'EX_phe_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_4HPRO(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_pro_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_ser_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_thr_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_trp_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_tyr_L(e)'</span><span >;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    </span><span style="color: rgb(170, 4, 249);">'EX_val_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_ascb_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_btn(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_chol(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_pnto_R(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_fol(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_ncam(e)'</span><span >;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    </span><span style="color: rgb(170, 4, 249);">'EX_pydxn(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_ribflv(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_thm(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_inost(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_ca2(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_fe3(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_k(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_hco3(e)'</span><span >;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    </span><span style="color: rgb(170, 4, 249);">'EX_na1(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_pi(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_glc(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_hxan(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_lnlc(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_lipoate(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_pyr(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_thymd(e)'</span><span >;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    </span><span style="color: rgb(170, 4, 249);">'EX_gthrd(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_anth(e)'</span><span >};</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span style="color: rgb(2, 128, 9);">% Medium concentrations</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >met_Conc_mM = [0.1;1.15;0.15;0.379;0.208;2;0.136;0.133;0.0968;0.382;0.382;0.274;0.101;0.0909;0.153;0.174;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    0.286;0.168;0.0245;0.129;0.171;0.00863;0.00082;0.0214;0.000524;0.00227;0.082;0.00485;0.000532;0.00297;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    0.194;0.424;0;5.33;23.81;127.26;5.63;11.11;0;0;0;1;0;0.00326;0.0073];</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'></div></div></div><div  class = 'S2'><span>Define constraints on basic medium components (i.e., metabolites that are uptake from the medium but not captured by the measured data) </span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span >mediumCompounds = {</span><span style="color: rgb(170, 4, 249);">'EX_co2(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_h(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_h2o(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_hco3(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_nh4(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_o2(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_pi(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_so4(e)'</span><span >};</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre"><span >mediumCompounds_lb = -100;</span></span></div></div></div><div  class = 'S2'><span>Define also additional constraints to limit the model behaviour (e.g., secretion of oxygen, essential amino acids that need to be taken up)</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span >customizedConstraints = {</span><span style="color: rgb(170, 4, 249);">'EX_o2(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_strch1(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_acetone(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_glc(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_his_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_val_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_met_L(e)'</span><span >};</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >customizedConstraints_lb = [-2.3460;0;0;-500;-100;-100;-100];</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre"><span >customizedConstraints_ub = [500;0;0;500;500;500;500];</span></span></div></div></div><div  class = 'S7'><span>Apply the medium constraints previously defined using </span><span style=' font-style: italic;'>setMediumConstraints. </span><span>Note that this function also require the definition of the cell concentration (</span><span style=' font-style: italic;'>cellConc</span><span>), the cell weight (</span><span style=' font-style: italic;'>cellWeight</span><span>), the time (</span><span style=' font-style: italic;'>t</span><span>), the current value and the new value for infinite constraints (respectively </span><span style=' font-style: italic;'>current_inf</span><span> and </span><span style=' font-style: italic;'>set_inf</span><span>).</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span >cellConc = 2.17 * 1e6;</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >cellWeight = 3.645e-12;</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >t = 48;</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >current_inf = 1000;</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >set_inf = 500;</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >[modelMedium, ~] = setMediumConstraints(starting_model, set_inf, current_inf, medium_composition, met_Conc_mM, cellConc, </span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre"><span >    t, cellWeight, mediumCompounds, mediumCompounds_lb, customizedConstraints, customizedConstraints_ub, customizedConstraints_lb);</span></span></div></div></div><h2  class = 'S5'><span>Step</span><span> </span><span style=' font-weight: bold;'>2</span><span>: calculate the limit of detection (LODs) for each metabolites</span></h2><div  class = 'S2'><span>Use the function </span><span style=' font-style: italic;'>calculateLODs</span><span> to converts detection limits of unit </span><span style=' font-style: italic;'>ng/mL</span><span> to </span><span style=' font-style: italic;'>mM</span><span> using the theoretical mass (g/mol)</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span >ex_RXNS = {</span><span style="color: rgb(170, 4, 249);">'EX_5mta(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_uri(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_chol(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_ncam(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_3mop(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_succ(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_pnto_R(e)'</span><span >;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    </span><span style="color: rgb(170, 4, 249);">'EX_5oxpro(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_thm(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_anth(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_4HPRO(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_lac_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_3mob(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_his_L(e)'</span><span >;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    </span><span style="color: rgb(170, 4, 249);">'EX_trp_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_orn(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_arg_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_thr_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_fol(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_gln_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_4pyrdx(e)'</span><span >;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    </span><span style="color: rgb(170, 4, 249);">'EX_ser_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_glc(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_ribflv(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_glu_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_tyr_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_phe_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_inost(e)'</span><span >;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    </span><span style="color: rgb(170, 4, 249);">'EX_Lcystin(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_leu_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_met_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_cys_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_asn_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_mal_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_ile_L(e)'</span><span >;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    </span><span style="color: rgb(170, 4, 249);">'EX_pyr(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_lys_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_ala_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_cit(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_pro_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_gly(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_asp_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_34hpp'</span><span >;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    </span><span style="color: rgb(170, 4, 249);">'EX_octa(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_4mop(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_glyb(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_val_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_ade(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_hxan(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_gua(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_ins(e)'</span><span >;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    </span><span style="color: rgb(170, 4, 249);">'EX_orot(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_ura(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_ahcys(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_cbasp(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_Lcystin(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_ser_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_cys_L(e)'</span><span >;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    </span><span style="color: rgb(170, 4, 249);">'EX_thm(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_arg_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_ncam(e)'</span><span >};</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >theo_mass = [298.0974;243.0617;104.1075;123.0558;129.0552;117.0188;220.1185;128.0348;265.1123;138.0555;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    132.0661;89.0239;115.0395;156.0773;205.0977;133.0977;175.1195;120.0661;440.1319;147.077;182.0453;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    106.0504;179.0556;377.1461;148.061;182.0817;166.0868;179.0556;241.0317;132.1025;150.0589;122.0276;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    133.0613;133.0137;132.1025;87.0082;147.1134;90.0555;191.0192;116.0712;74.0242;134.0453;180.157;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    172.265;130.142;118.0868;118.0868;136.0623;137.0463;152.0572;267.0729;155.0093;111.0195;385.1294;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    175.0355;241.0317;106.0504;122.0276;265.1123;175.1195;123.0558];</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >lod_ngmL = [0.3;1.7;2.8;3;3.5;3.9;4;4.8;6.1;7.7;8.1;10.9;11.2;13.6;15.7;16.9;24.8;25.6;25.7;28.4;32.7;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    37.5;44;45;45;47.4;48.4;59;59.7;68.9;74.1;77;82.1;99.2;112.9;121.3;131.7;133.5;150.8;169.2;214.3;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    229.5;537.3;10.9;3.5;2.8;28.2;1.6;0.8;48.9;8.8;37.1;52.4;50;229.5;59.7;37.5;77;6.1;24.8;3];</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre"><span >[lod_mM] = calculateLODs(theo_mass, lod_ngmL);</span></span></div></div></div><h2  class = 'S5'><span>Step</span><span> </span><span style=' font-weight: bold;'>3:</span><span> define the uptake and secretion profiles</span></h2><div  class = 'S2'><span>Exclude metabolites with uncertain experimental data from the list of metabolites for which uptake and secretion profiles need to be computed</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span >exclude_upt = {</span><span style="color: rgb(170, 4, 249);">'EX_gln_L(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_cys_L(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_ala_L(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_mal_L(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_fol(e)'</span><span >};</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre"><span >exclude_secr = {</span><span style="color: rgb(170, 4, 249);">'EX_gln_L(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_cys_L(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_ala_L(e)'</span><span >};</span></span></div></div></div><div  class = 'S7'><span>Define metabolites with missing experimental points but for which uptake and secretion profiles need to be computed</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span >add_secr = {</span><span style="color: rgb(170, 4, 249);">'EX_mal_L(e)'</span><span >};</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre"><span >add_upt = {};</span></span></div></div></div><div  class = 'S7'><span>The essential amino acids should be excluded from the secretion profile</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span >essAA_excl = {</span><span style="color: rgb(170, 4, 249);">'EX_his_L(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_ile_L(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_leu_L(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_lys_L(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_met_L(e)'</span><span >;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre"><span >    </span><span style="color: rgb(170, 4, 249);">'EX_phe_L(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_thr_L(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_trp_L(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_val_L(e)'</span><span >};</span></span></div></div></div><div  class = 'S7'><span>Define the list of metabolites for which experimental data are available</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span >data_RXNS = {</span><span style="color: rgb(170, 4, 249);">'EX_orn(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_mal_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_lac_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_gly(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_glu_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_cit(e)'</span><span >;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    </span><span style="color: rgb(170, 4, 249);">'EX_5oxpro(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_4mop(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_3mop(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_3mob(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_tyr_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_trp_L(e)'</span><span >;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    </span><span style="color: rgb(170, 4, 249);">'EX_thr_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_pyr(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_phe_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_lys_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_leu_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_ile_L(e)'</span><span >;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    </span><span style="color: rgb(170, 4, 249);">'EX_glc(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_chol(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_anth(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_val_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_met_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_his_L(e)'</span><span >;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    </span><span style="color: rgb(170, 4, 249);">'EX_gln_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_cys_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_ala_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_pi(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_asp_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_4HPRO(e)'</span><span >;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre"><span >    </span><span style="color: rgb(170, 4, 249);">'EX_pnto_R(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_pro_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_fol(e)'</span><span >};</span></span></div></div></div><div  class = 'S2'><span>Define the data associated with Molt-4 cell cultures</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span >input_A = [</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    </span><span style="color: rgb(2, 128, 9);">% control TP 1	control TP 2	Cond TP 1	Cond TP 2</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    65245.09667	68680.93	54272.41667	65159.50333</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    3000	30970.784	20292.406	27226.6555</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    2038946.433	1917042.967	5654513.467	101768253</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    163882.9467	186682.92	121762.3567	310547.7</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    473539.8667	455197.4667	462903.8333	1024508.5</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    8681.527333	8704.7345	9459.837	34177.945</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    29168.15	21808.73	120655.9867	2060525.467</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    3000	3000	34436.50433	113668.5123</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    3000	3000	25108.829	121927.3673</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    3000	3000	3000	14717.55667</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    4142302	4063607.667	3934639.333	3075783.333</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    2153692	2132723.667	2037735.333	1387754.333</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    406102.2667	417512.6333	381085.2333	259555.2667</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    465074.6	387569.1333	439148.0667	210407.8333</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    8087955	8345511.333	8215168.333	5360276</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    198435.8	195675.8	188473.1	112386.1667</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    20823770.33	20801258.67	19725086.67	15148808</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    21229254.67	21225778.33	20799761	17160163</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    76555640.67	71459886.33	61697085.33	34981419.33</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    876300.4333	905132.5	892182.2	541860.4667</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    159124.46	178538.2167	162567.13	3000</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    2857012.667	2900419.667	2853523.667	1793173.667</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    2995910.333	3018536.333	3024630.333	2266832.333</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    69077.16333	67843.12	69406.69	95624.28</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    3000	3000	824549.3667	2283200.867</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    45304.84667	52977.77333	56566.27667	60759.23</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    1613345.1	1258710.1	3430342.067	25970024.1</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    216828142.3	221118425	223518663	216863897.3</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    632160.0333	612562.3	590881.7333	940705.6</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    814465.8333	786011.5667	630513.4	622493.9</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    84638.70667	86751.96	89717.10667	68882.68333</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    5107317.333	5168599.333	5163708.333	5263614.333</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    95419.73667	105904.7067	97550.78667	102678.49</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre"><span >];</span></span></div></div></div><div  class = 'S2'><span>Define the data associated with CCRF-CEM cell cultures</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span >input_B = [</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    </span><span style="color: rgb(2, 128, 9);">% control 2 TP 1	control 2 TP 2	Cond 2 TP 1	Cond 2 TP 2</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    65245.09667	68680.93	73850.77	98489.89</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    3000	30970.784	3000	94181.77233</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    2038946.433	1917042.967	5222377.933	134980059.9</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    163882.9467	186682.92	219683.7	460476.5267</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    473539.8667	455197.4667	437398.3667	630407.2667</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    8681.527333	8704.7345	8317.144	86546.77933</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    29168.15	21808.73	62146.47333	1012932.38</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    3000	3000	9918.992	129433.4973</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    3000	3000	7222.259333	145547.7347</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    3000	3000	3000	17641.55667</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    4142302	4063607.667	4023284.333	3489981.333</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    2153692	2132723.667	2068977	1570648</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    406102.2667	417512.6333	386495.2	303808.2</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    465074.6	387569.1333	376779.1	249036.3333</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    8087955	8345511.333	8237784.667	6540301.667</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    198435.8	195675.8	196447.1	149861.6667</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    20823770.33	20801258.67	21119935.67	16346765.67</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    21229254.67	21225778.33	20790535.33	17219085</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    76555640.67	71459886.33	65009057.67	24330565.33</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    876300.4333	905132.5	884112.5667	259273.9333</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    159124.46	178538.2167	158271.14	60631.19333</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    2857012.667	2900419.667	2668140	2790196.333</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    2995910.333	3018536.333	2890029.333	2538211</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    69077.16333	67843.12	74035.24	86165.55</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    3000	3000	323185.6667	2063962.067</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    45304.84667	52977.77333	62076.23333	64524.22333</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    1613345.1	1258710.1	2788313.567	30868376.53</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    216828142.3	221118425	212276379	208623151.3</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    632160.0333	612562.3	680373.4333	770903.9333</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    814465.8333	786011.5667	679862.7	582257.4667</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    84638.70667	86751.96	88002.12	99449.36667</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    5107317.333	5168599.333	5134219	4445918.333</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    95419.73667	105904.7067	100629.24	84807.62333</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre"><span >];</span></span></div></div></div><div  class = 'S7'><span>Use the function </span><span style=' font-style: italic;'>defineUptakeSecretionProfiles</span><span> to calculate the uptake and secretion rate over the time of the culture for both condition (e.g. CCRF-CEM and Molt- 4 cells)</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span >tol = 0.05;</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >[cond1_uptake, cond2_uptake, cond1_secretion, cond2_secretion, slope_Ratio] = defineUptakeSecretionProfiles</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre"><span >    (input_A, input_B, data_RXNS, tol, essAA_excl, exclude_upt, exclude_secr, add_secr, add_upt);</span></span></div></div></div><h2  class = 'S5'><span>Step</span><span> </span><span style=' font-weight: bold;'>4</span><span>: Calculate the difference between the uptake and secretion profiles from the two conditions</span></h2><div  class = 'S2'><span>Use </span><span style=' font-style: italic;'>calculateQuantitativeDiffs </span><span>to calculate the sets of exchange reactions with higher uptake and secretion in condition 1 than in condition 2.</span></div><div  class = 'S2'><span>Also adapt the condition uptake and secretion for the second condition. this is sometimes necessary to allow the model to achieve a feasible flux.</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span >cond2_secretion = [cond2_secretion; </span><span style="color: rgb(170, 4, 249);">'EX_4pyrdx(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_34hpp'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_uri(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_succ(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_glyb(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_5mta(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_asn_L(e)'</span><span >];</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >cond2_secretion(ismember(cond2_secretion, {</span><span style="color: rgb(170, 4, 249);">'EX_asp_L(e)'</span><span >;</span><span style="color: rgb(170, 4, 249);">'EX_pnto_R(e)'</span><span >})) = [];</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >cond2_uptake = [cond2_uptake; </span><span style="color: rgb(170, 4, 249);">'EX_fol(e)'</span><span >];</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >cond2_uptake(ismember(cond2_uptake, {</span><span style="color: rgb(170, 4, 249);">'EX_met_L(e)'</span><span >})) = [];</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >[cond1_upt_higher, cond2_upt_higher, cond2_secr_higher, cond1_secr_higher, cond1_uptake_LODs,</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    cond2_uptake_LODs, cond1_secretion_LODs, cond2_secretion_LODs] = calculateQuantitativeDiffs(data_RXNS,</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre"><span >    slope_Ratio, ex_RXNS, lod_mM, cond1_uptake, cond2_uptake, cond1_secretion, cond2_secretion);</span></span></div></div></div><div  class = 'S2'><span>NOTE: Sometimes, you will need to remove some metabolites from the uptake and secretion profiles, e.g. those for which you assume a different directionality as in the data or if the metabolites is not detected at a specific sampling time. Indeed, the inclusion of these extreme point could distort the results. Example of consumption slope ratio associated to </span><span style=' font-style: italic;'>EX_anth(e)</span><span> is 1975% higher in Molt-4 compared to CCRF-CEM cells. Therefore, these metabolites need to be removed from the input for semi-quantitative adjustment unless such large differences are justified and make sense biologically.</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span >remove = {</span><span style="color: rgb(170, 4, 249);">'EX_anth(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_ile_L(e)'</span><span >};</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >A = [];</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span style="color: rgb(14, 0, 255);">for </span><span >i = 1:length(cond2_upt_higher)</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    </span><span style="color: rgb(14, 0, 255);">if </span><span >find(ismember(remove, cond2_upt_higher{i, 1})) &gt; 0</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >        A = [A; i];</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    </span><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre"><span >cond2_upt_higher(A, :) = [];</span></span></div></div></div><h2  class = 'S5'><span>Step</span><span> </span><span style=' font-weight: bold;'>5</span><span>:  Enforce uptake and secretion rate using qualitative constraints</span></h2><div  class = 'S2'><span>Use the function </span><span style=' font-style: italic;'>setQualitativeConstraints</span><span> to enforce minimal uptake or secretion based on individual detection limits (e.g., based on the uptake and secretion profile of metabolites measured through mass-spectrometry). If these values are not available, a very small value (e.g., 1.0E-06) can be used. Note that this value has to be below the concentrations defined in the medium, otherwise the model will be infeasible.</span></div><div  class = 'S2'><span>Definition of the qualitative constraints for Molt-4 cells</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span >ambiguous_metabolites = {</span><span style="color: rgb(170, 4, 249);">'EX_ala_L(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_gln_L(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_cys_L(e)'</span><span >};</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >basisMedium = {</span><span style="color: rgb(170, 4, 249);">'EX_o2(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_strch1(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_acetone(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_glc(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_his_L(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_ca2(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_cl(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_co(e)'</span><span >;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    </span><span style="color: rgb(170, 4, 249);">'EX_fe2(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_fe3(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_k(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_na1(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_i(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_sel(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_co2(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_h(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_h2o(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_hco3(e)'</span><span >;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    </span><span style="color: rgb(170, 4, 249);">'EX_nh4(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_o2(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_pi(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_so4(e)'</span><span >};</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >[model_A] = setQualitativeConstraints(modelMedium, cond1_uptake, cond1_uptake_LODs, cond1_secretion, cond1_secretion_LODs, </span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre"><span >    cellConc, t, cellWeight, ambiguous_metabolites, basisMedium);</span></span></div></div></div><div  class = 'S2'><span>Definition of the qualitative constraints for CCRF-CEM cells</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span >ambiguous_metabolites = {</span><span style="color: rgb(170, 4, 249);">'EX_ala_L(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_gln_L(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_pydxn(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_cys_L(e)'</span><span >};</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >basisMedium = {</span><span style="color: rgb(170, 4, 249);">'EX_ca2(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_cl(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_co(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_fe2(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_fe3(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_k(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_na1(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_i(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_sel(e)'</span><span >;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    </span><span style="color: rgb(170, 4, 249);">'EX_co2(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_h(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_h2o(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_hco3(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_nh4(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_o2(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_pi(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_so4(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_his_L(e)'</span><span >;</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >    </span><span style="color: rgb(170, 4, 249);">'EX_o2(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_strch1(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_acetone(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_glc(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_val_L(e)'</span><span >; </span><span style="color: rgb(170, 4, 249);">'EX_met_L(e)'</span><span >};</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >[model_B] = setQualitativeConstraints(modelMedium, cond2_uptake, cond2_uptake_LODs, cond2_secretion, cond2_secretion_LODs, </span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre"><span >    cellConc, t, cellWeight, ambiguous_metabolites, basisMedium);</span></span></div></div></div><h2  class = 'S5'><span>Step</span><span> 6: Define semi quantitative constraints</span></h2><div  class = 'S2'><span>Use the relative difference of signal intensities previously calculated for the two conditions (</span><span style=' font-style: italic;'>calculateQuantitativeDiffs</span><span>) to define semi-quantitative constraints (setSemiQuantConstraints).</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S8'><span style="white-space: pre"><span >[modelA_QUANT, modelB_QUANT] = setSemiQuantConstraints(model_A, model_B, cond1_upt_higher, cond2_upt_higher, cond2_secr_higher, cond1_secr_higher);</span></span></div></div></div><h2  class = 'S5'><span>Step</span><span> 7: Define growth constraints</span></h2><div  class = 'S2'><span>Using the data related to the doubling time for each cell, constrain the growth reaction using </span><span style=' font-style: italic;'>setConstraintsOnBiomassReaction</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span >GrowthRxn = </span><span style="color: rgb(170, 4, 249);">'biomass_reaction2'</span><span >;</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >tolerance = 20;</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >doublingTimeA = 19.6; </span><span style="color: rgb(2, 128, 9);">%MOLT4 cells</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >[model_A_BM] = setConstraintsOnBiomassReaction(modelA_QUANT, GrowthRxn, doublingTimeA, tolerance);</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >doublingTimeB = 22; </span><span style="color: rgb(2, 128, 9);">%CCRF-CEM</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre"><span >[model_B_BM] = setConstraintsOnBiomassReaction(modelB_QUANT, GrowthRxn, doublingTimeB, tolerance);</span></span></div></div></div><h2  class = 'S5'><span>Step</span><span> 8: Delete absent genes</span></h2><div  class = 'S2'><span>Constrain to zero the set of absent genes, defined in </span><span style=' font-style: italic;'>DataGenes</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span >dataGenes = [535;1548;2591;3037;4248;4709;6522;7167;7367;8399;23545;129807;221823]; </span><span style="color: rgb(2, 128, 9);">% set of genes absent in MOLT4 cells</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >[model_A_GE] = integrateGeneExpressionData(model_A_BM, dataGenes);</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >dataGenes = [239;443;535;1548;2683;3037;4248;4709;5232;6522;7364;7367;8399;23545;54363;66002;129807;221823];</span><span style="color: rgb(2, 128, 9);">% set of genes absent in CCRF-CEM cells</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre"><span >[model_B_GE] = integrateGeneExpressionData(model_B_BM, dataGenes);</span></span></div></div></div><h2  class = 'S5'><span>Step</span><span> 9: Extract a condition specific FVA</span></h2><div  class = 'S2'><span>Use extractConditionSpecificModel to prune the model based on a user-defined flux value threshold. This function a flux variability analyis to extract a subnetwork for which all reactions carry fluxes higher or equal to the defined threshold value</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span >theshold = 1e-6;</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >model = model_A_GE;</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >[model_Molt] = extractConditionSpecificModel(model, theshold);</span><span style="color: rgb(2, 128, 9);">%  MOLT4 condition specific model</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre"><span >[model_CEM] = extractConditionSpecificModel(model_B_GE, theshold);</span><span style="color: rgb(2, 128, 9);">%  CCRF-CEM condition specific model</span></span></div></div></div><div  class = 'S2'><span style=' font-weight: bold;'>ANTICIPATED RESULTS</span></div><div  class = 'S2'><span>Compare the differents model generated previously by analysing the metabolite connectivity of the networks</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span >[MetConn, RxnLength] = networkTopology(modelMedium); </span><span style="color: rgb(2, 128, 9);">% model constrained by medium composition data</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >[MetConnA, RxnLengthA] = networkTopology(model_Molt); </span><span style="color: rgb(2, 128, 9);">%  MOLT4 condition specific model</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >[MetConnB, RxnLengthB] = networkTopology(model_CEM); </span><span style="color: rgb(2, 128, 9);">%  CCRF-CEM condition specific model</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >MetConnCompare = sort(MetConn, </span><span style="color: rgb(170, 4, 249);">'descend'</span><span >);</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >MetConnCompareA = sort(MetConnA, </span><span style="color: rgb(170, 4, 249);">'descend'</span><span >);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre"><span >MetConnCompareB = sort(MetConnB, </span><span style="color: rgb(170, 4, 249);">'descend'</span><span >);</span></span></div></div></div><div  class = 'S7'><span>Plot metabolite connectivity</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span >figure</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >semilogy(sort(MetConnCompare, </span><span style="color: rgb(170, 4, 249);">'descend'</span><span >), </span><span style="color: rgb(170, 4, 249);">'ro'</span><span >)</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >hold</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >semilogy(sort(MetConnCompareA, </span><span style="color: rgb(170, 4, 249);">'descend'</span><span >), </span><span style="color: rgb(170, 4, 249);">'bo'</span><span >)</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >semilogy(sort(MetConnCompareB, </span><span style="color: rgb(170, 4, 249);">'descend'</span><span >), </span><span style="color: rgb(170, 4, 249);">'go'</span><span >)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre"><span >title(</span><span style="color: rgb(170, 4, 249);">'Metabolite connectivity'</span><span >)</span></span></div></div></div><div  class = 'S7'><span>The models can also be compared by performing a sampling analysis using </span><span style=' font-style: italic;'>performSampling</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span >fprintf(</span><span style="color: rgb(170, 4, 249);">'Perform sampling analysis\n'</span><span >);</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >warmupn = 2000;</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >nFiles = 10;</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >pointsPerFile = 1000;</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >stepsPerPoint = 500;</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >fileBaseNo = 0;</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >maxTime = 3600000;</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >fileName = </span><span style="color: rgb(170, 4, 249);">'modelA'</span><span >;</span><span style="color: rgb(2, 128, 9);">%  MOLT4 condition specific model</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >performSampling(model_Molt, warmupn, fileName, nFiles, pointsPerFile, stepsPerPoint, fileBaseNo, maxTime, outputPath);</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >fileName = </span><span style="color: rgb(170, 4, 249);">'modelB'</span><span >;</span><span style="color: rgb(2, 128, 9);">%  CCRF-CEM condition specific model</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre"><span >performSampling(model_CEM, warmupn, fileName, nFiles, pointsPerFile, stepsPerPoint, fileBaseNo, maxTime, outputPath);</span></span></div></div></div><div  class = 'S7'><span>Use the function </span><span style=' font-style: italic;'>summarizeSamplingResults</span><span> to return the median of the flux values from the two sampled models. The analysis can be limited to a specific set of reaction defined in </span><span style=' font-style: italic;'>show_rxns</span><span>. Moreover, reactions associated with genes of special interest ( e.g. differentially expressed genes) can be defined in </span><span style=' font-style: italic;'>dataGenes</span><span> to facilitate the analysis</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre"><span >fonts = 8;</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >nFiles = 10;</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >pointsPerFile = 1000;</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >starting_Model = modelMedium;</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >hist_per_page = 4;</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >bin = 30;</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >modelA = model_Molt;</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >modelB = model_CEM;</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >dataGenes = [32;205;411;412;1537;1608;1632;1645;1737;1757;2108;2184;2224;2539];</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre"><span >show_rxns = {</span><span style="color: rgb(170, 4, 249);">'PYK'</span><span >;</span><span style="color: rgb(170, 4, 249);">'SUCD1m'</span><span >;</span><span style="color: rgb(170, 4, 249);">'ATPS4m'</span><span >;</span><span style="color: rgb(170, 4, 249);">'ETF'</span><span >};</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre"><span >[stats, statsR] = summarizeSamplingResults(modelA, modelB, outputPath, nFiles, pointsPerFile, starting_Model, dataGenes, show_rxns, fonts, hist_per_page, bin, </span><span style="color: rgb(170, 4, 249);">'modelA'</span><span >, </span><span style="color: rgb(170, 4, 249);">'modelB'</span><span >);</span></span></div></div></div>
<br>
<!-- 
##### SOURCE BEGIN #####
%% Metabotools tutorial I
%% Authors: Maike K. Aurich, Sylvain Arreckx, *Systems Biochemistry Group, LCSB, University of Luxembourg.*
%% *Reviewer(s): Anne Richelle, Lewis Lab at University of California, San Diego.*
% *INTRODUCTION*
% 
% In this tutorial, we generate contextualized models of two lymphoblastic leukemia 
% cell lines, CCRF-CEM and Molt- 4 cells. They will be generated by integrating 
% semi-quantitative metabolomic data, transcriptomic data, and growth rates. We 
% will afterwards analyze the solution space of these models by using a sampling 
% analysis.
% 
% Before running a section in the tutorial, read the corresponding sections 
% in the MetaboTools protocol and supplemental tutorial (Data sheet 2, <http://journal.frontiersin.org/article/10.3389/fphys.2016.00327/full 
% http://journal.frontiersin.org/article/10.3389/fphys.2016.00327/full>). 
%% 
% *PROCEDURE*
% 
% Clear workspace and initialize the COBRA Toolbox

clear
initCobraToolbox(false) % false, as we don't want to update
%% Step *0* - Define the output location and set the LP solver
% Define the output path and set the solver for LP problem

global CBTDIR % set path to cobratoolbox (pathToCOBRA)
outputPath = pwd;% ouputPath = 'ADD YOUR PATH TO YOUR OUTPUT FOLDER'
solver = 'glpk'; % solver = 'ADD YOUR SOLVER'; %, e.g., 'cplex_direct' for ILOG
solverOK = changeCobraSolver(solver, 'LP');
%% 
% Check the solver setup

if solverOK == 1
    fprintf('Solver %s is set.\n', solver);
else
    error('Solver %s could not be used. Check if %s is in the matlab path (set path) or check for typos', solver, solver);
end
%% 
% Load and check that the input model is correclty loaded

tutorialPath = fileparts(which('tutorial_metabotoolsI.mlx'));
if isequal(exist([tutorialPath filesep 'starting_model.mat'], 'file'), 2)
    starting_model = readCbModel([tutorialPath filesep 'starting_model.mat']);
    fprintf('The model is loaded.\n');
else
    error('The model ''starting_model'' could not be loaded.');
end
%% 
% Check output path and writing permission

if ~exist(outputPath, 'dir') == 7
    error('Output directory in ''outputPath'' does not exist. Verify that you type it correctly or create the directory.');
end

% Make and save a dummy file to test the writing to output directory
A = rand(1);
try
    save([outputPath filesep 'A']);
catch ME
    error('Files cannot be saved to the provided location: %s\nObtain rights to write into %s directory or set ''outputPath'' to a different directory.', outputPath, outputPath);
end
%% Step 1: Shaping the model's environment using setMediumConstraints
% Constrain the model using the data related to RPMI medium composition. To 
% this end, define the set of exchange reactions for which exometabolomic data 
% are available

medium_composition = {'EX_ala_L(e)';'EX_arg_L(e)';'EX_asn_L(e)';'EX_asp_L(e)';'EX_cys_L(e)';'EX_gln_L(e)';...
    'EX_glu_L(e)';'EX_gly(e)';'EX_his_L(e)';'EX_ile_L(e)';'EX_leu_L(e)';'EX_lys_L(e)';'EX_met_L(e)';...
    'EX_phe_L(e)';'EX_4HPRO(e)';'EX_pro_L(e)';'EX_ser_L(e)';'EX_thr_L(e)';'EX_trp_L(e)';'EX_tyr_L(e)';...
    'EX_val_L(e)';'EX_ascb_L(e)';'EX_btn(e)';'EX_chol(e)';'EX_pnto_R(e)';'EX_fol(e)';'EX_ncam(e)';...
    'EX_pydxn(e)';'EX_ribflv(e)';'EX_thm(e)';'EX_inost(e)';'EX_ca2(e)';'EX_fe3(e)';'EX_k(e)';'EX_hco3(e)';...
    'EX_na1(e)';'EX_pi(e)';'EX_glc(e)';'EX_hxan(e)';'EX_lnlc(e)';'EX_lipoate(e)';'EX_pyr(e)';'EX_thymd(e)';...
    'EX_gthrd(e)';'EX_anth(e)'};

% Medium concentrations
met_Conc_mM = [0.1;1.15;0.15;0.379;0.208;2;0.136;0.133;0.0968;0.382;0.382;0.274;0.101;0.0909;0.153;0.174;...
    0.286;0.168;0.0245;0.129;0.171;0.00863;0.00082;0.0214;0.000524;0.00227;0.082;0.00485;0.000532;0.00297;...
    0.194;0.424;0;5.33;23.81;127.26;5.63;11.11;0;0;0;1;0;0.00326;0.0073];

%% 
% Define constraints on basic medium components (i.e., metabolites that are 
% uptake from the medium but not captured by the measured data) 

mediumCompounds = {'EX_co2(e)';'EX_h(e)';'EX_h2o(e)';'EX_hco3(e)';'EX_nh4(e)';'EX_o2(e)';'EX_pi(e)';'EX_so4(e)'};
mediumCompounds_lb = -100;
%% 
% Define also additional constraints to limit the model behaviour (e.g., secretion 
% of oxygen, essential amino acids that need to be taken up)

customizedConstraints = {'EX_o2(e)';'EX_strch1(e)';'EX_acetone(e)';'EX_glc(e)';'EX_his_L(e)';'EX_val_L(e)';'EX_met_L(e)'};
customizedConstraints_lb = [-2.3460;0;0;-500;-100;-100;-100];
customizedConstraints_ub = [500;0;0;500;500;500;500];
%% 
% Apply the medium constraints previously defined using _setMediumConstraints._ 
% Note that this function also require the definition of the cell concentration 
% (_cellConc_), the cell weight (_cellWeight_), the time (_t_), the current value 
% and the new value for infinite constraints (respectively _current_inf_ and _set_inf_).

cellConc = 2.17 * 1e6;
cellWeight = 3.645e-12;
t = 48;
current_inf = 1000;
set_inf = 500;
[modelMedium, ~] = setMediumConstraints(starting_model, set_inf, current_inf, medium_composition, met_Conc_mM, cellConc, ...
    t, cellWeight, mediumCompounds, mediumCompounds_lb, customizedConstraints, customizedConstraints_ub, customizedConstraints_lb);
%% Step *2*: calculate the limit of detection (LODs) for each metabolites
% Use the function _calculateLODs_ to converts detection limits of unit _ng/mL_ 
% to _mM_ using the theoretical mass (g/mol)

ex_RXNS = {'EX_5mta(e)';'EX_uri(e)';'EX_chol(e)';'EX_ncam(e)';'EX_3mop(e)';'EX_succ(e)';'EX_pnto_R(e)';...
    'EX_5oxpro(e)';'EX_thm(e)';'EX_anth(e)';'EX_4HPRO(e)';'EX_lac_L(e)';'EX_3mob(e)';'EX_his_L(e)';...
    'EX_trp_L(e)';'EX_orn(e)';'EX_arg_L(e)';'EX_thr_L(e)';'EX_fol(e)';'EX_gln_L(e)';'EX_4pyrdx(e)';...
    'EX_ser_L(e)';'EX_glc(e)';'EX_ribflv(e)';'EX_glu_L(e)';'EX_tyr_L(e)';'EX_phe_L(e)';'EX_inost(e)';...
    'EX_Lcystin(e)';'EX_leu_L(e)';'EX_met_L(e)';'EX_cys_L(e)';'EX_asn_L(e)';'EX_mal_L(e)';'EX_ile_L(e)';...
    'EX_pyr(e)';'EX_lys_L(e)';'EX_ala_L(e)';'EX_cit(e)';'EX_pro_L(e)';'EX_gly(e)';'EX_asp_L(e)';'EX_34hpp';...
    'EX_octa(e)';'EX_4mop(e)';'EX_glyb(e)';'EX_val_L(e)';'EX_ade(e)';'EX_hxan(e)';'EX_gua(e)';'EX_ins(e)';...
    'EX_orot(e)';'EX_ura(e)';'EX_ahcys(e)';'EX_cbasp(e)';'EX_Lcystin(e)';'EX_ser_L(e)';'EX_cys_L(e)';...
    'EX_thm(e)';'EX_arg_L(e)';'EX_ncam(e)'};

theo_mass = [298.0974;243.0617;104.1075;123.0558;129.0552;117.0188;220.1185;128.0348;265.1123;138.0555;...
    132.0661;89.0239;115.0395;156.0773;205.0977;133.0977;175.1195;120.0661;440.1319;147.077;182.0453;...
    106.0504;179.0556;377.1461;148.061;182.0817;166.0868;179.0556;241.0317;132.1025;150.0589;122.0276;...
    133.0613;133.0137;132.1025;87.0082;147.1134;90.0555;191.0192;116.0712;74.0242;134.0453;180.157;...
    172.265;130.142;118.0868;118.0868;136.0623;137.0463;152.0572;267.0729;155.0093;111.0195;385.1294;...
    175.0355;241.0317;106.0504;122.0276;265.1123;175.1195;123.0558];

lod_ngmL = [0.3;1.7;2.8;3;3.5;3.9;4;4.8;6.1;7.7;8.1;10.9;11.2;13.6;15.7;16.9;24.8;25.6;25.7;28.4;32.7;...
    37.5;44;45;45;47.4;48.4;59;59.7;68.9;74.1;77;82.1;99.2;112.9;121.3;131.7;133.5;150.8;169.2;214.3;...
    229.5;537.3;10.9;3.5;2.8;28.2;1.6;0.8;48.9;8.8;37.1;52.4;50;229.5;59.7;37.5;77;6.1;24.8;3];

[lod_mM] = calculateLODs(theo_mass, lod_ngmL);
%% Step *3:* define the uptake and secretion profiles
% Exclude metabolites with uncertain experimental data from the list of metabolites 
% for which uptake and secretion profiles need to be computed

exclude_upt = {'EX_gln_L(e)'; 'EX_cys_L(e)'; 'EX_ala_L(e)'; 'EX_mal_L(e)'; 'EX_fol(e)'};
exclude_secr = {'EX_gln_L(e)'; 'EX_cys_L(e)'; 'EX_ala_L(e)'};
%% 
% Define metabolites with missing experimental points but for which uptake and 
% secretion profiles need to be computed

add_secr = {'EX_mal_L(e)'};
add_upt = {};
%% 
% The essential amino acids should be excluded from the secretion profile

essAA_excl = {'EX_his_L(e)'; 'EX_ile_L(e)'; 'EX_leu_L(e)'; 'EX_lys_L(e)'; 'EX_met_L(e)';...
    'EX_phe_L(e)'; 'EX_thr_L(e)'; 'EX_trp_L(e)'; 'EX_val_L(e)'};
%% 
% Define the list of metabolites for which experimental data are available

data_RXNS = {'EX_orn(e)';'EX_mal_L(e)';'EX_lac_L(e)';'EX_gly(e)';'EX_glu_L(e)';'EX_cit(e)';...
    'EX_5oxpro(e)';'EX_4mop(e)';'EX_3mop(e)';'EX_3mob(e)';'EX_tyr_L(e)';'EX_trp_L(e)';...
    'EX_thr_L(e)';'EX_pyr(e)';'EX_phe_L(e)';'EX_lys_L(e)';'EX_leu_L(e)';'EX_ile_L(e)';...
    'EX_glc(e)';'EX_chol(e)';'EX_anth(e)';'EX_val_L(e)';'EX_met_L(e)';'EX_his_L(e)';...
    'EX_gln_L(e)';'EX_cys_L(e)';'EX_ala_L(e)';'EX_pi(e)';'EX_asp_L(e)';'EX_4HPRO(e)';...
    'EX_pnto_R(e)';'EX_pro_L(e)';'EX_fol(e)'};
%% 
% Define the data associated with Molt-4 cell cultures

input_A = [
    % control TP 1	control TP 2	Cond TP 1	Cond TP 2
    65245.09667	68680.93	54272.41667	65159.50333
    3000	30970.784	20292.406	27226.6555
    2038946.433	1917042.967	5654513.467	101768253
    163882.9467	186682.92	121762.3567	310547.7
    473539.8667	455197.4667	462903.8333	1024508.5
    8681.527333	8704.7345	9459.837	34177.945
    29168.15	21808.73	120655.9867	2060525.467
    3000	3000	34436.50433	113668.5123
    3000	3000	25108.829	121927.3673
    3000	3000	3000	14717.55667
    4142302	4063607.667	3934639.333	3075783.333
    2153692	2132723.667	2037735.333	1387754.333
    406102.2667	417512.6333	381085.2333	259555.2667
    465074.6	387569.1333	439148.0667	210407.8333
    8087955	8345511.333	8215168.333	5360276
    198435.8	195675.8	188473.1	112386.1667
    20823770.33	20801258.67	19725086.67	15148808
    21229254.67	21225778.33	20799761	17160163
    76555640.67	71459886.33	61697085.33	34981419.33
    876300.4333	905132.5	892182.2	541860.4667
    159124.46	178538.2167	162567.13	3000
    2857012.667	2900419.667	2853523.667	1793173.667
    2995910.333	3018536.333	3024630.333	2266832.333
    69077.16333	67843.12	69406.69	95624.28
    3000	3000	824549.3667	2283200.867
    45304.84667	52977.77333	56566.27667	60759.23
    1613345.1	1258710.1	3430342.067	25970024.1
    216828142.3	221118425	223518663	216863897.3
    632160.0333	612562.3	590881.7333	940705.6
    814465.8333	786011.5667	630513.4	622493.9
    84638.70667	86751.96	89717.10667	68882.68333
    5107317.333	5168599.333	5163708.333	5263614.333
    95419.73667	105904.7067	97550.78667	102678.49
];
%% 
% Define the data associated with CCRF-CEM cell cultures

input_B = [
    % control 2 TP 1	control 2 TP 2	Cond 2 TP 1	Cond 2 TP 2
    65245.09667	68680.93	73850.77	98489.89
    3000	30970.784	3000	94181.77233
    2038946.433	1917042.967	5222377.933	134980059.9
    163882.9467	186682.92	219683.7	460476.5267
    473539.8667	455197.4667	437398.3667	630407.2667
    8681.527333	8704.7345	8317.144	86546.77933
    29168.15	21808.73	62146.47333	1012932.38
    3000	3000	9918.992	129433.4973
    3000	3000	7222.259333	145547.7347
    3000	3000	3000	17641.55667
    4142302	4063607.667	4023284.333	3489981.333
    2153692	2132723.667	2068977	1570648
    406102.2667	417512.6333	386495.2	303808.2
    465074.6	387569.1333	376779.1	249036.3333
    8087955	8345511.333	8237784.667	6540301.667
    198435.8	195675.8	196447.1	149861.6667
    20823770.33	20801258.67	21119935.67	16346765.67
    21229254.67	21225778.33	20790535.33	17219085
    76555640.67	71459886.33	65009057.67	24330565.33
    876300.4333	905132.5	884112.5667	259273.9333
    159124.46	178538.2167	158271.14	60631.19333
    2857012.667	2900419.667	2668140	2790196.333
    2995910.333	3018536.333	2890029.333	2538211
    69077.16333	67843.12	74035.24	86165.55
    3000	3000	323185.6667	2063962.067
    45304.84667	52977.77333	62076.23333	64524.22333
    1613345.1	1258710.1	2788313.567	30868376.53
    216828142.3	221118425	212276379	208623151.3
    632160.0333	612562.3	680373.4333	770903.9333
    814465.8333	786011.5667	679862.7	582257.4667
    84638.70667	86751.96	88002.12	99449.36667
    5107317.333	5168599.333	5134219	4445918.333
    95419.73667	105904.7067	100629.24	84807.62333
];
%% 
% Use the function _defineUptakeSecretionProfiles_ to calculate the uptake and 
% secretion rate over the time of the culture for both condition (e.g. CCRF-CEM 
% and Molt- 4 cells)

tol = 0.05;
[cond1_uptake, cond2_uptake, cond1_secretion, cond2_secretion, slope_Ratio] = defineUptakeSecretionProfiles...
    (input_A, input_B, data_RXNS, tol, essAA_excl, exclude_upt, exclude_secr, add_secr, add_upt);
%% Step *4*: Calculate the difference between the uptake and secretion profiles from the two conditions
% Use _calculateQuantitativeDiffs_ to calculate the sets of exchange reactions 
% with higher uptake and secretion in condition 1 than in condition 2.
% 
% Also adapt the condition uptake and secretion for the second condition. this 
% is sometimes necessary to allow the model to achieve a feasible flux.

cond2_secretion = [cond2_secretion; 'EX_4pyrdx(e)';'EX_34hpp';'EX_uri(e)';'EX_succ(e)';'EX_glyb(e)';'EX_5mta(e)';'EX_asn_L(e)'];
cond2_secretion(ismember(cond2_secretion, {'EX_asp_L(e)';'EX_pnto_R(e)'})) = [];
cond2_uptake = [cond2_uptake; 'EX_fol(e)'];
cond2_uptake(ismember(cond2_uptake, {'EX_met_L(e)'})) = [];

[cond1_upt_higher, cond2_upt_higher, cond2_secr_higher, cond1_secr_higher, cond1_uptake_LODs,...
    cond2_uptake_LODs, cond1_secretion_LODs, cond2_secretion_LODs] = calculateQuantitativeDiffs(data_RXNS,...
    slope_Ratio, ex_RXNS, lod_mM, cond1_uptake, cond2_uptake, cond1_secretion, cond2_secretion);
%% 
% NOTE: Sometimes, you will need to remove some metabolites from the uptake 
% and secretion profiles, e.g. those for which you assume a different directionality 
% as in the data or if the metabolites is not detected at a specific sampling 
% time. Indeed, the inclusion of these extreme point could distort the results. 
% Example of consumption slope ratio associated to _EX_anth(e)_ is 1975% higher 
% in Molt-4 compared to CCRF-CEM cells. Therefore, these metabolites need to be 
% removed from the input for semi-quantitative adjustment unless such large differences 
% are justified and make sense biologically.

remove = {'EX_anth(e)'; 'EX_ile_L(e)'};
A = [];
for i = 1:length(cond2_upt_higher)
    if find(ismember(remove, cond2_upt_higher{i, 1})) > 0
        A = [A; i];
    end
end
cond2_upt_higher(A, :) = [];
%% Step *5*:  Enforce uptake and secretion rate using qualitative constraints
% Use the function _setQualitativeConstraints_ to enforce minimal uptake or 
% secretion based on individual detection limits (e.g., based on the uptake and 
% secretion profile of metabolites measured through mass-spectrometry). If these 
% values are not available, a very small value (e.g., 1.0E-06) can be used. Note 
% that this value has to be below the concentrations defined in the medium, otherwise 
% the model will be infeasible.
%% 
% Definition of the qualitative constraints for Molt-4 cells

ambiguous_metabolites = {'EX_ala_L(e)'; 'EX_gln_L(e)'; 'EX_cys_L(e)'};

basisMedium = {'EX_o2(e)'; 'EX_strch1(e)'; 'EX_acetone(e)'; 'EX_glc(e)'; 'EX_his_L(e)'; 'EX_ca2(e)'; 'EX_cl(e)'; 'EX_co(e)';...
    'EX_fe2(e)'; 'EX_fe3(e)'; 'EX_k(e)'; 'EX_na1(e)'; 'EX_i(e)'; 'EX_sel(e)'; 'EX_co2(e)'; 'EX_h(e)'; 'EX_h2o(e)'; 'EX_hco3(e)';...
    'EX_nh4(e)'; 'EX_o2(e)'; 'EX_pi(e)'; 'EX_so4(e)'};

[model_A] = setQualitativeConstraints(modelMedium, cond1_uptake, cond1_uptake_LODs, cond1_secretion, cond1_secretion_LODs, ...
    cellConc, t, cellWeight, ambiguous_metabolites, basisMedium);
%% 
% Definition of the qualitative constraints for CCRF-CEM cells

ambiguous_metabolites = {'EX_ala_L(e)'; 'EX_gln_L(e)'; 'EX_pydxn(e)'; 'EX_cys_L(e)'};

basisMedium = {'EX_ca2(e)'; 'EX_cl(e)'; 'EX_co(e)'; 'EX_fe2(e)'; 'EX_fe3(e)'; 'EX_k(e)'; 'EX_na1(e)'; 'EX_i(e)'; 'EX_sel(e)';...
    'EX_co2(e)'; 'EX_h(e)'; 'EX_h2o(e)'; 'EX_hco3(e)'; 'EX_nh4(e)'; 'EX_o2(e)'; 'EX_pi(e)'; 'EX_so4(e)'; 'EX_his_L(e)';...
    'EX_o2(e)'; 'EX_strch1(e)'; 'EX_acetone(e)'; 'EX_glc(e)'; 'EX_val_L(e)'; 'EX_met_L(e)'};

[model_B] = setQualitativeConstraints(modelMedium, cond2_uptake, cond2_uptake_LODs, cond2_secretion, cond2_secretion_LODs, ...
    cellConc, t, cellWeight, ambiguous_metabolites, basisMedium);
%% Step 6: Define semi quantitative constraints
% Use the relative difference of signal intensities previously calculated for 
% the two conditions (_calculateQuantitativeDiffs_) to define semi-quantitative 
% constraints (setSemiQuantConstraints).

[modelA_QUANT, modelB_QUANT] = setSemiQuantConstraints(model_A, model_B, cond1_upt_higher, cond2_upt_higher, cond2_secr_higher, cond1_secr_higher);
%% Step 7: Define growth constraints
% Using the data related to the doubling time for each cell, constrain the growth 
% reaction using _setConstraintsOnBiomassReaction_

GrowthRxn = 'biomass_reaction2';
tolerance = 20;
doublingTimeA = 19.6; %MOLT4 cells
[model_A_BM] = setConstraintsOnBiomassReaction(modelA_QUANT, GrowthRxn, doublingTimeA, tolerance);
doublingTimeB = 22; %CCRF-CEM
[model_B_BM] = setConstraintsOnBiomassReaction(modelB_QUANT, GrowthRxn, doublingTimeB, tolerance);
%% Step 8: Delete absent genes
% Constrain to zero the set of absent genes, defined in _DataGenes_

dataGenes = [535;1548;2591;3037;4248;4709;6522;7167;7367;8399;23545;129807;221823]; % set of genes absent in MOLT4 cells
[model_A_GE] = integrateGeneExpressionData(model_A_BM, dataGenes);

dataGenes = [239;443;535;1548;2683;3037;4248;4709;5232;6522;7364;7367;8399;23545;54363;66002;129807;221823];% set of genes absent in CCRF-CEM cells
[model_B_GE] = integrateGeneExpressionData(model_B_BM, dataGenes);
%% Step 9: Extract a condition specific FVA
% Use extractConditionSpecificModel to prune the model based on a user-defined 
% flux value threshold. This function a flux variability analyis to extract a 
% subnetwork for which all reactions carry fluxes higher or equal to the defined 
% threshold value

theshold = 1e-6;
model = model_A_GE;
[model_Molt] = extractConditionSpecificModel(model, theshold);%  MOLT4 condition specific model
[model_CEM] = extractConditionSpecificModel(model_B_GE, theshold);%  CCRF-CEM condition specific model
%% 
% *ANTICIPATED RESULTS*
% 
% Compare the differents model generated previously by analysing the metabolite 
% connectivity of the networks

[MetConn, RxnLength] = networkTopology(modelMedium); % model constrained by medium composition data
[MetConnA, RxnLengthA] = networkTopology(model_Molt); %  MOLT4 condition specific model
[MetConnB, RxnLengthB] = networkTopology(model_CEM); %  CCRF-CEM condition specific model
MetConnCompare = sort(MetConn, 'descend');
MetConnCompareA = sort(MetConnA, 'descend');
MetConnCompareB = sort(MetConnB, 'descend');
%% 
% Plot metabolite connectivity

figure
semilogy(sort(MetConnCompare, 'descend'), 'ro')
hold
semilogy(sort(MetConnCompareA, 'descend'), 'bo')
semilogy(sort(MetConnCompareB, 'descend'), 'go')
title('Metabolite connectivity')
%% 
% The models can also be compared by performing a sampling analysis using _performSampling_

fprintf('Perform sampling analysis\n');
warmupn = 2000;
nFiles = 10;
pointsPerFile = 1000;
stepsPerPoint = 500;
fileBaseNo = 0;
maxTime = 3600000;

fileName = 'modelA';%  MOLT4 condition specific model
performSampling(model_Molt, warmupn, fileName, nFiles, pointsPerFile, stepsPerPoint, fileBaseNo, maxTime, outputPath);
fileName = 'modelB';%  CCRF-CEM condition specific model
performSampling(model_CEM, warmupn, fileName, nFiles, pointsPerFile, stepsPerPoint, fileBaseNo, maxTime, outputPath);
%% 
% Use the function _summarizeSamplingResults_ to return the median of the flux 
% values from the two sampled models. The analysis can be limited to a specific 
% set of reaction defined in _show_rxns_. Moreover, reactions associated with 
% genes of special interest ( e.g. differentially expressed genes) can be defined 
% in _dataGenes_ to facilitate the analysis

fonts = 8;
nFiles = 10;
pointsPerFile = 1000;
starting_Model = modelMedium;
hist_per_page = 4;
bin = 30;
modelA = model_Molt;
modelB = model_CEM;
dataGenes = [32;205;411;412;1537;1608;1632;1645;1737;1757;2108;2184;2224;2539];
show_rxns = {'PYK';'SUCD1m';'ATPS4m';'ETF'};
[stats, statsR] = summarizeSamplingResults(modelA, modelB, outputPath, nFiles, pointsPerFile, starting_Model, dataGenes, show_rxns, fonts, hist_per_page, bin, 'modelA', 'modelB');
##### SOURCE END #####
-->
</div></body></html>